.class Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;
.super Lcom/burstly/lib/network/request/DefaultRequestCallback;
.source "BurstlyTextAdaptor.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "ImageCallback"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/burstly/lib/network/request/DefaultRequestCallback",
        "<",
        "Landroid/graphics/Bitmap;",
        ">;"
    }
.end annotation


# instance fields
.field private final mAdaptor:Ljava/lang/ref/Reference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/Reference",
            "<",
            "Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;",
            ">;"
        }
    .end annotation
.end field

.field private final mImageView:Ljava/lang/ref/Reference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/Reference",
            "<",
            "Landroid/widget/ImageView;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method constructor <init>(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;Landroid/widget/ImageView;)V
    .locals 1
    .parameter "adaptor"
    .parameter "targetImageView"

    .prologue
    .line 137
    invoke-direct {p0}, Lcom/burstly/lib/network/request/DefaultRequestCallback;-><init>()V

    .line 138
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->mAdaptor:Ljava/lang/ref/Reference;

    .line 139
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->mImageView:Ljava/lang/ref/Reference;

    .line 140
    return-void
.end method


# virtual methods
.method public onFailUi(Landroid/graphics/Bitmap;)V
    .locals 5
    .parameter "param"

    .prologue
    .line 157
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;

    .line 158
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 159
    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->access$300()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v1

    #getter for: Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;
    invoke-static {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->access$200(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "Failed to load type image from url"

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Object;

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logError(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 160
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->failed()V

    .line 162
    :cond_0
    return-void
.end method

.method public bridge synthetic onFailUi(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 119
    check-cast p1, Landroid/graphics/Bitmap;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->onFailUi(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public onSuccessUi(Landroid/graphics/Bitmap;)V
    .locals 6
    .parameter "param"

    .prologue
    .line 144
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;

    .line 145
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->mImageView:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    .line 146
    .local v1, targetImage:Landroid/widget/ImageView;
    if-eqz v0, :cond_0

    if-eqz v1, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->isStopped()Z

    move-result v2

    if-nez v2, :cond_0

    .line 147
    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAdjustViewBounds(Z)V

    .line 148
    invoke-virtual {v1, p1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 149
    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->access$100()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v2

    #getter for: Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;
    invoke-static {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->access$000(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;)Ljava/lang/String;

    move-result-object v3

    const-string v4, "Type image fetched by url came from burstly."

    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 150
    iget v2, v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLoadedComponentsCount:I

    add-int/lit8 v2, v2, 0x1

    iput v2, v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLoadedComponentsCount:I

    .line 151
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->notifyIfLoaded()V

    .line 153
    :cond_0
    return-void
.end method

.method public bridge synthetic onSuccessUi(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 119
    check-cast p1, Landroid/graphics/Bitmap;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;->onSuccessUi(Landroid/graphics/Bitmap;)V

    return-void
.end method
